import React, { useState, useEffect } from 'react'
import store from './redux/store'
export default function useRedux() {
  const [a, setA] = useState(0)

  useEffect(() => {
    store.subscribe(() => {
      //   console.log('store的数据改变了', store.getState())
      setA((a) => a + 1)
    })
  }, [])
}
